<?php
include '../connect/common_start.php';
if (isset($_REQUEST['post_id'])){
	$post_id=$_REQUEST['post_id'];
	//echo $post_id;
	//$result=mysql_query("SELECT * FROM `comment` c WHERE c.id_post='$post_id'");
	$result=mysql_query("SELECT c.id,c.id_mem,c.id_post,c.cm_id,c.cm_content,c.date,m.mem_id as'mem_id',m.mem_name,m.mem_pic FROM `comment` c JOIN member m ON c.id_mem=m.id WHERE (c.id_post='$post_id' AND c.status='1') ORDER BY c.date");
	$row=array();
	while ($r=mysql_fetch_assoc($result)) {
		$row[]=$r;
	}
	echo json_encode($row);
}
include '../connect/common_end.php';

?>